import { logger } from "../utils/logger.js";

export class Bti {
    constructor(browser) {
        this.browser = browser
        this.context = browser.context
        this.page = browser.pages[0]
        this.baseUrl = "http://192.168.0.108/welcome"
    }
    async openWeb() {
        try {
            await this.page.goto(this.baseUrl)
            logger.info("成功打开网页")
            this.getMatchList()
        } catch (error) {
            logger.error(error)
        }
    }
    async getMatchList() {
         try {
            const d = await this.page.locator('class="match-item"').all()
            logger.info(d)
         } catch (error) {
            logger.error(error)
         }
    }
}